#include <iostream>

using namespace std;

int main()
{
    string s;
    cout << "vvedite slova cherez probel" << endl;
    getline( cin, s );
    cout<<endl;
    s= s + ' ';
    int count_words = 0;
    for ( int i=0; i < s.size(); i++) {
        if (s[i]==' ') count_words += 1;
    }
    if (count_words<2) {
        cout << "nedostatochno informacii dlya analiza";
        exit (0); }
    else
    cout << "kolvo slov: " << count_words << endl;


    int count_words_zagl_kyr = 0;
    if ( (s[0]>='А') and (s[0]<='Я') ) count_words_zagl_kyr = 1;
    for ( int i = 1; i<s.size() - 1; i++) {
            if((s[i]==' ') and ((s[i+1]>='А') and (s[i+1]<='Я'))) count_words_zagl_kyr +=1;
    }
    cout<<"kolvo slov s zaglavnoi kirillicheskoi bykvi:" << count_words_zagl_kyr<< endl;


    int count_words_latin_symvol = 0;
    bool latin_symvol=false;
    for(int t = 0; i<s.size(); i++) {
            if(((s[i]>='a')and(s[i]<='z'))or((s[i]>='A')and(s[i]<='Z'))) latin_symvol=true;
            if((s[i]==' ')and(latin_symvol==true)){
                    count_words_latin_symvol+=1;
                    latin_symvol = false; }
    }
    count<<"kolvo slov soderzshashih latinskyi simvol:"<<count_words_latin_symvol<<endl;


    int count_words_3=0;
    int col_simvol=0;
    for(int i=0; i<s.size;i++){
            if(s[i]!=' ')col_simvol+=1;
            if((s[i]==' ')and(col_simvol<=3)){
                    count_words_3+=1;
                    col_simvol=0;}
            if((s[i]==' ')and(col_simvol>3))col_simvol=0;
    }
    cout<<"kolvo slov ne previsshashih 3 symvola:"<<count_words_3<<endl;





}
